lst = set(input().split())
lst = [int(i) for i in lst]
lst.sort(key = lambda x:(-(x % 2), x))
for i in lst:
    print(i,end = ' ')